-
Notifications
You must be signed in to change notification settings - Fork 347
Add missing Stylelint properties and automatic grouping #6221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
383fd82 to
6464237
Compare
|
@colinrotherham Thanks for this! I'm planning to get to this this week, if not today, so I've rebased it as a start |
|
Not sure how those test failures got in as I reran this locally during rebase using the same command as the test 🤔 I'll fix them in a jiffy since it was my rebase that introduced them |
|
@owenatgov I don't think the checks ran previously did they? This commit 6464237 caused it I'd removed rules "unnecessary" for NHS.UK frontend but you still need them Proves that it works 😆 |
|
Also @colinrotherham a littel update on this: The devs are happy with the added stylelint rules but we're less cohesive on the use of groups, specifically the spacing between groups. This is a preference thing between team members so for my money the answer is that we make a call on it. Gonna try to get this figured out soon as poss. |
Of course, that's the idea We've been running with these settings on NHS.UK frontend for a little while and they've been a big help in answering "how would GOV.UK Frontend order this Sass"—including your usage of new lines too But we've also seen that the spacing between some groups should be optional really E.g. Keeping So please don't take this PR "as is", make it work for you (if you want it) |
|
We want it! 😂 We just need to work out what bits of it we want. Thanks for the added context. |
Hope you don't mind us giving back from nhsuk/nhsuk-frontend#1589?
We spotted the Stylelint config
order/properties-orderlist was getting a bit out of dateFor example, it was missing:
flexandalign-itemscolumn-gapandrow-gapgrid-template-columnsmask-image,mask-repeatetcPlus some readily used obscure properties such as
pointer-eventsandtext-decoration-thicknessThis PR adds missing properties and turns on automatic grouping
Automatic grouping
Support for automatic grouping was added in
[email protected]usingemptyLineBefore: 'threshold'Sass files in GOV.UK Frontend are
manuallynow automatically split up into groups:i.e. One less thing to fix manually when saving files
Format on save
Visual Studio code can be configured to automatically apply ESLint, Stylelint and Prettier formatting: